<!--
 * @Author: Qimu
 * @Date: 2020-09-02 20:24:12
 * @LastEditors: Qimu
 * @LastEditTime: 2020-09-14 23:11:22
 * @Description: file content
 * @FilePath: \vue-admin-koa2\vue-admin\src\components\Common\Dialog.vue
-->
<template>
  <div class="dialog">
    <el-dialog
      :title="$attrs.dialogData.title"
      :width="$attrs.dialogData.width"
      :visible.sync="$attrs.dialogData.dialogVisible"
      :center="true"
    >
      <slot></slot>
      <div class="zt-dialogFooter flex flex-end" v-if="$attrs.dialogData.type !== 'importPole'">
        <div class="zt-confirm" @click="confirmDialog">确认</div>
        <div class="zt-cancel" @click="cancelDialog">取消</div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    lineForm: {
      type: Object
    }
  },
  data() {
    return {};
  },
  created() { },
  computed: {},
  methods: {
    confirmDialog() {
      this.$emit('confirmDialog', {
        type: this.$attrs.dialogData.type,
        lineForm: this.lineForm
      });
    },
    cancelDialog() {
      this.$attrs.dialogData.dialogVisible = false;
    }
  }
};
</script>

<style lang="sass" scoped>
// .zt-dialogFooter {
//   border-top: 1px #eee solid padding-top: 15px div {
//   width: 120px height: 30px color: #fff margin-right: 19px background-color: #0cc line-height: 30px text-align: center border-radius: 15px border: 1px solid #dadada cursor: pointer &.zt-cancel {
//   background-color: #fff color: #333
//     }
//   }
// }
</style>
